package com.glsc.ngateway.platform.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.glsc.ngateway.common.api.flowable.resp.ResponseSituationDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * @author guoj
 * @description: 测试管理返回给前端
 * @date 2024/7/30 9:33
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class ResponseTestTaskDto extends ResponseSituationDto {

    @ApiModelProperty(value = "主键")
    private Long id;

    @ApiModelProperty(value = "需求流程标题")
    private String requirementTitle;

    @ApiModelProperty(value = "需求流程id")
    private String requirementId;

    @ApiModelProperty(value = "发起人姓名")
    String flowCreateOperatorName;
    @ApiModelProperty(value = "发起人账号oa")
    String flowCreateOperatorAccount;
    @ApiModelProperty(value = "发起人部门名称")
    String flowCreatorDepartment;

    @ApiModelProperty(value = "发起时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime processCreateTime;

    @ApiModelProperty(value = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    protected LocalDateTime updateTime;

    @ApiModelProperty(value = "测试流程标题")
    private String testProcessTitle;

    @ApiModelProperty(value = "测试流程状态")
    private String testProcessStatus;
}
